﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MxWeiXinPF.BLL
{
    public partial class wx_dt_user_BaseData
    {
        private readonly MxWeiXinPF.DAL.wx_dt_user_BaseData dal;
        private readonly MxWeiXinPF.Model.siteconfig siteConfig = new MxWeiXinPF.BLL.siteconfig().loadConfig();


        public wx_dt_user_BaseData()
        {
            this.dal = new MxWeiXinPF.DAL.wx_dt_user_BaseData();
        }

        public MxWeiXinPF.Model.users GetModelByOpenID(string openid)
        {
            return dal.GetModelByOpenID(openid);
        }

        public bool ExistsWidAndOpenid(int wid, string openid)
        {
            return dal.ExistsWidAndOpenid(wid, openid);
        }

        public int addUserInfo(int wid, string openid, int subscribeStatusDesc, string nickname, int sex, string language, string city, string province, string country, string headimgul, string remark, string unionid, string parentopenid, int shopid)
        {
            return dal.addUserInfo(wid, openid, subscribeStatusDesc, nickname, sex, language, city, province, country, headimgul, remark, unionid, parentopenid, shopid);
        }
         public int addUserInfoForScan(int wid, string openid, int subscribeStatusDesc, string nickname, int sex, string language, string city, string province, string country, string headimgul, string remark, string unionid, string parentopenid, int shopid)
        {
            return dal.addUserInfoForScan(wid, openid, subscribeStatusDesc, nickname, sex, language, city, province, country, headimgul, remark, unionid, parentopenid, shopid);
        }
        public int addUserInfoOauth(int wid, string openid, string nickname, int sex, string language, string city, string province, string country, string headimgul, string unionid, int shopid, string parentopenid)
        {
            return dal.addUserInfoOauth(wid, openid, nickname, sex, language, city, province, country, headimgul, unionid, shopid, parentopenid);
        }

        public int updateNoUserInfoOauth(int wid, string openid, string nickname, int sex, string language, string city, string province, string country, string headimgul, string unionid, int shopid)
        {
            return dal.updateNoUserInfoOauth(wid, openid, nickname, sex, language, city, province, country, headimgul, unionid, shopid);
        }

        public int SelectShopIDByOpenid(string openid)
        {
            return dal.SelectShopIDByOpenid(openid);
        }

        public DataSet GetDateSetFromDtManager(string strWhere)
        {
            return dal.GetDateSetFromDtManager(strWhere);
        }

        public string SelectShopNameByShopid(int id)
        {
            return dal.SelectShopNameByShopid(id);
        }

        public int UpdatePidAndShopid(string id, string parentopenid, int shopid)
        {
            return dal.UpdatePidAndShopid(id, parentopenid, shopid);
        }

        public int UpdateUserInfoUnSubscribe(int wid, string openid, int subscribeStatusDesc)
        {
            return dal.UpdateUserInfoUnSubscribe(wid, openid, subscribeStatusDesc);
        }

        public MxWeiXinPF.Model.users GetModel(int id)
        {
            return dal.GetModel(id);
        }

         public int UpdateUserInfo(int wid, string openid, int subscribeStatusDesc, string nickname, int sex, string language, string city, string province, string country, string headimgul, string remark, string unionid, string parentopenid, int shopid)
        {
            return dal.UpdateUserInfo(wid, openid, subscribeStatusDesc, nickname, sex, language, city, province, country, headimgul, remark, unionid, parentopenid, shopid);
        }
    }
}
